var express=require('express');

var router=express.Router();  /*使用express.Router()类创建模块化，可挂载的路由句柄*/

var homepage = require("./page/homepage.js");    //二级路由

var activePage = require("./page/activepage.js");    //二级路由

var post = require("./page/post.js");    //二级路由

var addexam = require("./page/addexam.js");

var add = require("./page/add.js");


router.use('/homepage',homepage);

router.use('/activepage',activePage);

router.use('/post',post);

router.use('/add',add);

router.use('/addexam',addexam); 

//最终路由
router.get('/',function (req,res) {
    res.render('app/index');
})

router.get('/information',function (req,res) {
    res.send('information页面');
})


module.exports = router; /*模块化暴露*/
